#include "XmlData.h"


xml::XmlData::XmlData()
{
	root = 0;
	rootIsSet = false;
}

void xml::XmlData::setRoot(XmlNode *node)
{
	if(!rootIsSet)
		this->root = node;
	else
		std::cerr<<"Cannot set root, reset it first!\n";
	this->rootIsSet = true;
}

xml::XmlNode * xml::XmlData::getRoot()
{
	if(rootIsSet)
		return root;
	else
		std::cerr<<"Cannot get the root node since the xml is empty!";
	return 0;
}

xml::XmlData::~XmlData(void)
{
}
